using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using CodeFactory.Library.Language;
using CodeFactory.Library.Config;

namespace CodeFactory.Library.CodeRunner
{
    public class RunnerMethod
    {
        private MethodInfo method;
        private object runnerObject;

        public RunnerMethod()
        {
        }

        public MethodInfo Method
        {
            get { return this.method; }
            set { this.method = value; }
        }

        public object RunnerObject
        {
            get { return this.runnerObject; }
            set { this.runnerObject = value; }
        }

        public object Run(object[] paras)
        {
            return this.method.Invoke(this.runnerObject, paras);
        }
    }
}
